package cn.gzsf.springboot09.mapper;

import cn.gzsf.springboot09.entity.Emp;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface EmpMapper {
   @Insert("insert into myemp (name,job,sal) values (#{name},#{job},#{sal})")
    void insert(Emp emp);
   @Delete("delete from myemp where id=#{id}")
   void delete(int id);
   @Update("update myemp set name=#{name},job=#{job},sal=#{sal} where id=#{id}")
   void update(Emp emp);
   @Select("select * from myemp")
   List<Emp> select();

   @Select("select * from myemp where id=#{id}")
   Emp selectOne(int id);
}
